-- 创建生成加载数据脚本到gdb

local file = io.open(arg[1],"w+");
assert(file,"create file f\n");
local s = [[
target remote :3333
restore #BIN# binary 0x1fff8000
set $pc=0x1fff8000
# c
# disconnect
# quit
]]

s = s:gsub('#BIN#',arg[2]);
file:write(s);
file:close();